<?php include_once '../emag/avaliador_emag.php'; $avaliador = new AvaliadorEMAG(); $avaliador->setCodHTML('<!DOCTYPE >
<html xml:lang="pt-br">
<html lang="pt-br">
<html>
<head><!--
	teste de comentario
	--></head>
<body>
	<script>
	//teste de script
	window.location="teste";
 </script>
 <script>
	window.location.href="teste";
	document.location.href="teste";
	window.document.location.href="teste";
 </script>
	<img src="teste.gif" alt="teste" />
	<label for="nome"><input type="text" id="nome" value="*" />
	<area href="teste.html">
	<a href="teste.html">teste</a> <a href="teste2.html">teste2</a>
	<iframe title="teste">bbb</iframe>
	<frame title="teste">
         
	<noframes>
         
	<a href="teste-vazio"></a>
	<a href="teste-clique-aqui">clique aqui</a>
	
	<label for="texta">
	<textarea id="texta"></textarea>
         
	<label for="selecta">
	<select id="selecta">
	
	<select id="selectErro">
	
	<tr>
              <td><input type="checkbox" value="1" id="No200" name="No200"

		/><label title="Validate also pages for which the HTTP status code indicates an error" for="No200">Validate&nbsp;error&nbsp;pages</label></td>
              <td><input type="checkbox" value="1" id="verbose" name="verbose"

	checked="checked"

		/><label title="Show Verbose Output" for="verbose">Verbose&nbsp;Output</label></td>
    		<td><input id="st" name="st" type="checkbox" value="1"
                        
    		         /><label for="st">Clean up Markup with HTML Tidy</label></td>
            </tr>
            
            <input type="hidden" value="W3C_Validator/1.1" id="user-agent" name="user-agent" />
             
            <object alt="teste">teste</object>
             
</body></html>');


$rs = $avaliador->avaliar();
$er = new RegrasEmag();
echo "<ul>";
foreach ($rs as $r){
	if($r->isErro()) echo '<li>' . $r->getLinha() . ') ' . $r->getIdTextoRegra() .  ' - ' . $er->getTextoRegra($r->getIdTextoRegra()) . '<br />' . str_replace('<', '&lt;', $r->getTagCompleta()) . "</li>";
}
echo "</ul>";

echo '<pre>';
echo str_replace('<', '&lt;', $avaliador->getCodHTML());
echo '</pre>';

echo 'SCRIPTS:';
echo '<pre>*********';
echo $avaliador->scripts;
echo '***********</pre>';